<!DOCTYPE html>

<html>
<head>
<meta charset="utf-8">
<title>GUCCI USER TABLE</title>
<script src="../files/js/jquery-1.10.2.js" charset="utf-8"></script>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../files/js/css/layui.css" media="all">
<!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
	

	<script type="text/html" id="barDemo">
  		<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>
		<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>

	</script>
	<script src="../files/js/layui.js" charset="utf-8"></script>
	<script>
	layui.use('table', function() {
		
		
		
	
		
		
		
	});
	
	function add(){
		num = 0;
		//页面层
		layer.open({
		  type: 2,
		  skin: 'layui-layer-rim', //加上边框
		  area: ['320px', '240px'], //宽高
		  content: '../page/comm.html'
		});
		
		$.ajax({
			asyn:true,
			type:"POST",
			url:url,
			data:datas,
			success:function(fh){
				eval("var msg="+fh);
				alert(123);
				for(var i=0;i<msg.length;i++){
					alert(2222221331313);
					$("#role").append("<option value='"+msg[i].roleId+"'>"+msg[i].roleName+"</option>"); //为Select追加一个Option(下拉项)
				}
				
			},
			error:function(fh){
				layer.msg("修改失败");
			}
		});
		
	}
	</script>
	<button class="layui-btn layui-btn-primary" onclick="add();">增加</button>
</body>
</html>